package com.hopu.service.Impl;


import com.hopu.mapper.SortMapper;
import com.hopu.pojo.Sort;
import com.hopu.service.SortService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SortServiceImpl implements SortService {
    @Resource
    private SortMapper sortMapper;

    @Override
    public List<Sort> findAllSort() {
        return sortMapper.findAllSort();
    }

    @Override
    public Sort findSortByNameOrId(String sname, Integer sid) {
        return sortMapper.findSortByNameOrId(sname,sid);
    }

    @Override
    public boolean addSort(String sname) {
        return sortMapper.addSort(sname);
    }

    @Override
    public boolean uppSort(Integer sid, String sname) {
        return sortMapper.uppSort(sid,sname);
    }

    @Override
    public List<Sort> findAllName() {
        return sortMapper.findAllName();
    }
}
